from .build import DatasetLoader

@DatasetLoader.register()
class ComposeDataset:
    @classmethod
    def build(cls, dataset_config):
        return sum(*[
            DatasetLoader.get(dataset_name_or_config)
            for dataset_name_or_config in dataset_config['datasets']
        ])
